home *** CD-ROM | disk | FTP | other *** search
/ Network Support Library / RoseWare - Network Support Library.iso / apidev / mhs_c.arc / OUTPOST.ARC / ERROROUT.C < prev    next >
C/C++ Source or Header  |  1988-06-17  |  882b  |  38 lines

  1. /* ****************************** ERROROUT.C ****************************** */
  2. #include "cctypes.h"
  3.  
  4. extern int lNumber;
  5. extern int lineNumber;
  6. extern int WarningsInThisFile;
  7. extern int ErrorsInThisFile;
  8. extern int comType;
  9. extern int warningFound;
  10.  
  11. void Error(n)
  12. int n;
  13. {
  14.     if ( lNumber != lineNumber ) {
  15.         lNumber = lineNumber;
  16.         if ( !WarningsInThisFile && !ErrorsInThisFile )
  17.             printf("\n");
  18.         printf("*** error(s) on line %d ***\n", lNumber);
  19.     }
  20.     printf("    %s %s\n",CommandTypes[comType],ErrorTypes[n]);
  21.     ErrorsInThisFile++;
  22. }
  23.  
  24. void Warning(n)
  25. int n;
  26. {
  27.     if ( lNumber != lineNumber ) {
  28.         lNumber = lineNumber;
  29.         if ( !WarningsInThisFile && !ErrorsInThisFile )
  30.             printf("\n");
  31.         printf("*** warning(s) on line %d ***\n", lNumber);
  32.     }
  33.     warningFound = 1;
  34.     WarningsInThisFile++;
  35.     printf("    %s %s\n",CommandTypes[comType],ErrorTypes[n]);
  36. }
  37.  
  38.